#ifndef _PTZ_HELPER_H_
#define _PTZ_HELPER_H_
#include <vector>
#include <map>

#define CMD_START "start"
#define CMD_STOP  "stop"

struct CMD_Param{
    char PName;
    const char* PValue;
    CMD_Param(char n, char* v): PName(n), PValue(v){}
};

class PTZHelper {
private:
    static const char* None;
    const char cmd_param_ptz        = 'd';
    const char cmd_param_channel    = 'c';
    const char cmd_param_action     = 'a'; 
    std::vector<CMD_Param> params;
    std::map<const char*, int> MOVE_DIRECTOR;
    //初始化PTZ的map
    void init_move_director();
public:
    PTZHelper(int argc, char *argv[]);
    //参数判断
    std::vector<CMD_Param> get_opt(int argc, char *argv[]);
    //获取参数值
    const char* get_opt_value(const char key);
    //判断值是否为None
    bool is_none(const char* value);
    // 获取PTZ参数（移动方向、缩放）
    int get_director(const char* key);
    int director();
    int action();
    int channel();
};

#endif

